// 模拟接口
import Mock from 'mockjs'

// 兑换列表
Mock.mock('coins/his', /post|get/i, {
 code: 1,
 data: {
  'list|10': [
   {
    time: '@date(yyyy-MM-dd hh:mm)',
    finalCoinCode: 'BTC',
    finalBalance: '@natural(0, 100)'
   }
  ],
  total: 100
 }
})

// 资产明细
Mock.mock('assets/history', {
 code: 1,
 data: {
  'list|10': [
   {
    time: '@now',
    finalCoinCode: 'BTC',
    finalBalance: '@natural(0, 100)',
    'opera|1-11': 1,
    'type|1-2': 1
   }
  ],
  total: 15
 }
})

// 提存款记录
Mock.mock('account/rechargeCashoutHis', {
 code: 1,
 data: {
  'list|10': [
   {
    time: '@date(yyyy-MM-dd hh:mm)',
    'coinsCode': 'BTC',
    payBalance: '@natural(0, 100)',
    erc20Address: '@string(20)',
    'opera|1-2': 1,
    'state|1-2': 1
   }
  ],
  total: 10
 }
})

// 矿机历史列表
Mock.mock('miner/customer', {
 code: 1,
 data: {
  'list|10': [
   {
    time: '@date(yyyy-MM-dd hh:mm)',
    'coinsCode': 'BTC',
    'days|1-100': 1,
    'revenuePrice|1-100': 1,
    'subPrice|1-100': 1,
    'rate': '@float(0, 100, 2, 2)',
    dayPrice: '@natural(0, 100)',
    price: '@natural(0, 100)',
    name: '@string(5)',
   }
  ],
  total: 10
 }
})